local skill = fk.CreateSkill {
  name = "ling__dragon_stick_skill&",
  attached_equip = "ling__dragon_stick",
}

Fk:loadTranslationTable{
  ["ling__dragon_stick_skill&"] = "盘龙棍",
  [":ling__dragon_stick_skill&"] = "你可将两张手牌当【杀】使用或打出，若为打出你摸一张牌。",
  ["#ling__dragon_stick_skill&"] = "大盘龙棍：你可将两张手牌当【杀】使用或打出",
}

skill:addEffect("viewas", {
  prompt = "#ling__dragon_stick_skill&",
  pattern = "slash",
  handly_pile = true,
  card_filter = function(self, player, to_select, selected)
    return #selected < 2 and table.contains(player:getHandlyIds(), to_select)
  end,
  view_as = function(self, player, cards)
    if #cards ~= 2 then return nil end
    local c = Fk:cloneCard("slash")
    c.skillName = "ling__dragon_stick"
    c:addSubcards(cards)
    return c
  end,
  before_use = function (self, player, use)
    if #use.tos == 0 then
      player:drawCards(1, skill.name)
    end
  end,
})

skill:addAI(nil, "vs_skill", "ling__dragon_stick_skill")

return skill
